﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace IslandInterloper.Engine
{
    internal abstract class GameClientCollectionStringKeyed<ValueType>:GameClientCollection<string,ValueType> where ValueType:GameClient
    {
        internal GameClientCollectionStringKeyed(Game theGame)
            : base(theGame)
        {
        }
        internal GameClientCollectionStringKeyed(Game theGame, XElement element)
            : base(theGame,element)
        {
        }
        protected override string LoadKeyFromXElement(System.Xml.Linq.XElement element)
        {
            return element.Name.LocalName;
        }

        protected override System.Xml.Linq.XName KeyToXName(string theKey)
        {
            return theKey;
        }
    }
}
